﻿@model ShoppingCartModel.OrderReviewDataModel
@using Nop.Web.Models.ShoppingCart;
@if (Model.Display)
{
    <div class="order-review-data-box">
        <div class="billinginfo">
            <div class="title">
                <strong>
                    @T("Order.BillingAddress")</strong>
            </div>
            <div class="name">@Model.BillingAddress.FirstName @Model.BillingAddress.LastName</div>
            <div class="email">
                @T("Order.Email"): @Model.BillingAddress.Email
            </div>
            @if (Model.BillingAddress.PhoneEnabled)
            {
                <div class="phone">
                    @T("Order.Phone"): @Model.BillingAddress.PhoneNumber
                </div>
            }
            @if (Model.BillingAddress.FaxEnabled)
            {
                <div class="fax">
                    @T("Order.Fax"): @Model.BillingAddress.FaxNumber
                </div>
            }
            @if (Model.BillingAddress.CompanyEnabled && !String.IsNullOrEmpty(Model.BillingAddress.Company))
            {
                <div class="company">
                    @Model.BillingAddress.Company
                </div>
            }
            @if (Model.BillingAddress.StreetAddressEnabled)
            {
                <div class="address1">
                    @Model.BillingAddress.Address1
                </div>
            }
            @if (Model.BillingAddress.StreetAddress2Enabled && !String.IsNullOrEmpty(Model.BillingAddress.Address2))
            {
                <div class="address2">
                    @Model.BillingAddress.Address2
                </div>
            }
            @if (Model.BillingAddress.CityEnabled ||
                            Model.BillingAddress.StateProvinceEnabled ||
                            Model.BillingAddress.ZipPostalCodeEnabled)
            {
                <div class="city-state-zip">
                    @if (Model.BillingAddress.CityEnabled)
                    {
                        @Model.BillingAddress.City
                    }
                    @if (Model.BillingAddress.CityEnabled && (Model.BillingAddress.StateProvinceEnabled || Model.BillingAddress.ZipPostalCodeEnabled))
                    {
                        <text>,</text>
                    }
                    @if (Model.BillingAddress.StateProvinceEnabled)
                    {
                        @Model.BillingAddress.StateProvinceName
                    }
                    @if (Model.BillingAddress.ZipPostalCodeEnabled)
                    {
                        @Model.BillingAddress.ZipPostalCode
                    }
                </div>
            }
            @if (Model.BillingAddress.CountryEnabled && !String.IsNullOrEmpty(Model.BillingAddress.CountryName))
            {
                <div class="country">
                    @Model.BillingAddress.CountryName
                </div>
            }
            @if (!String.IsNullOrEmpty(Model.PaymentMethod))
            {
                <div class="payment-method">
                    <div class="payment-method-label">
                        <strong>@T("Order.PaymentMethod")</strong>
                    </div>
                    <div class="payment-method-value">
                        @Model.PaymentMethod
                    </div>
                </div>
            }
        </div>
        @if (Model.IsShippable)
        {
            <div class="shippinginfo">
                <div class="title">
                    <strong>
                        @T("Order.ShippingAddress")</strong>
                </div>
                <div class="name">
                    @Model.ShippingAddress.FirstName @Model.ShippingAddress.LastName
                </div>
                <div class="email">
                    @T("Order.Email"): @Model.ShippingAddress.Email
                </div>
                @if (Model.ShippingAddress.PhoneEnabled)
                {
                    <div class="phone">
                        @T("Order.Phone"): @Model.ShippingAddress.PhoneNumber
                    </div>
                }
                @if (Model.ShippingAddress.FaxEnabled)
                {
                    <div class="fax">
                        @T("Order.Fax"): @Model.ShippingAddress.FaxNumber
                    </div>
                }
                @if (Model.ShippingAddress.CompanyEnabled && !String.IsNullOrEmpty(Model.ShippingAddress.Company))
                {
                    <div class="company">
                        @Model.ShippingAddress.Company
                    </div>
                }
                @if (Model.ShippingAddress.StreetAddressEnabled)
                {
                    <div class="address1">
                        @Model.ShippingAddress.Address1
                    </div>
                }
                @if (Model.ShippingAddress.StreetAddress2Enabled && !String.IsNullOrEmpty(Model.ShippingAddress.Address2))
                {
                    <div class="address2">
                        @Model.ShippingAddress.Address2
                    </div>
                }
                @if (Model.ShippingAddress.CityEnabled ||
                            Model.ShippingAddress.StateProvinceEnabled ||
                            Model.ShippingAddress.ZipPostalCodeEnabled)
                {
                    <div class="city-state-zip">
                        @if (Model.ShippingAddress.CityEnabled)
                        {
                            @Model.ShippingAddress.City
                        }
                        @if (Model.ShippingAddress.CityEnabled && (Model.ShippingAddress.StateProvinceEnabled || Model.ShippingAddress.ZipPostalCodeEnabled))
                        {
                            <text>,</text>
                        }
                        @if (Model.ShippingAddress.StateProvinceEnabled)
                        {
                            @Model.ShippingAddress.StateProvinceName
                        }
                        @if (Model.ShippingAddress.ZipPostalCodeEnabled)
                        {
                            @Model.ShippingAddress.ZipPostalCode
                        }
                    </div>
                }
                @if (Model.ShippingAddress.CountryEnabled && !String.IsNullOrEmpty(Model.ShippingAddress.CountryName))
                {
                    <div class="country">
                        @Model.ShippingAddress.CountryName
                    </div>
                }
                <div class="shipping-method">
                    <div class="shipping-method-label">
                        <strong>@T("Order.ShippingMethod")</strong>
                    </div>
                    <div class="shipping-method-value">
                        @Model.ShippingMethod
                    </div>
                </div>
            </div>
        }
    </div>
}